﻿<Window x:Class="BioWF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:bioWf="clr-namespace:BioWF"
        Title=".NET Bio Workflow Workbench" Height="768" Width="1024">
    <DockPanel>
        <Ribbon DockPanel.Dock="Top">
            <Ribbon.ApplicationMenu>
                <RibbonApplicationMenu>
                    <RibbonApplicationMenuItem Header="New Bio Workflow" Command="New"  ImageSource="Images/new16x16.png" />
                    <RibbonApplicationMenuItem Header="Open an existing Bio Workflow..." Command="Open"  ImageSource="Images/open16x16.png" />
                    <RibbonApplicationMenuItem Header="Save Current Workflow" Command="Save"  ImageSource="Images/save16x16.png" />
                    <RibbonApplicationMenuItem Header="Save Current Workflow As..." Command="SaveAs" ImageSource="Images/save16x16.png" />
                    <RibbonApplicationMenuItem Header="Close Current Workflow" Command="Close" />
                    <RibbonApplicationMenuItem Header="E_xit Program" Command="bioWf:AppCommands.Exit" />
                </RibbonApplicationMenu>
            </Ribbon.ApplicationMenu>
            <RibbonTab Header="Home">
                <RibbonGroup Header="Load / Save">
                    <RibbonButton SmallImageSource="Images/open16x16.png" 
                                  LargeImageSource="Images/open32x32.png"
                                  Label="Open existing Bio Workflow..."
                                  Command="Open"/>
                    <RibbonButton SmallImageSource="Images/save16x16.png" 
                                  LargeImageSource="Images/save32x32.png"
                                  Label="Save Current Bio Workflow As..."
                                  Command="SaveAs"/>
                    <RibbonButton SmallImageSource="Images/new16x16.png" 
                                  Label="New Bio Workflow"
                                  Command="New"/>
                    <RibbonButton SmallImageSource="Images/save16x16.png" 
                                  Label="Save Current Bio Workflow"
                                  Command="Save"/>
                </RibbonGroup>
                <RibbonGroup Header="Execute">
                    <RibbonButton Label="Run Workflow" Command="{Binding Run}" 
                                  SmallImageSource="Images/start16x16.png"
                                  LargeImageSource="Images/start32x32.png"/>
                </RibbonGroup>
            </RibbonTab>
        </Ribbon>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="2" />
                <ColumnDefinition />
                <ColumnDefinition Width="2" />
                <ColumnDefinition Width="275" />
            </Grid.ColumnDefinitions>

            <ContentControl x:Name="toolboxPlaceholder" />

            <GridSplitter Grid.Column="1"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          ResizeBehavior="PreviousAndNext"
                          Background="Silver" />

            <Grid Grid.Column="2">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <ContentControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" x:Name="designerPlaceholder" />

                <ListBox Grid.Row="1" Foreground="Red" ItemsSource="{Binding Errors}">
                    <ListBox.Style>
                        <Style TargetType="ListBox">
                            <Setter Property="Height" Value="100" />
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding Errors.Count}" Value="0">
                                    <Setter Property="Height" Value="0" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </ListBox.Style>
                </ListBox>
            
            </Grid>

            <GridSplitter Grid.Column="3"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          ResizeBehavior="PreviousAndNext"
                          Background="Silver" />

            
            <Grid Grid.Column="4">
                
                <Grid.RowDefinitions>
                    <RowDefinition Height=".5*" />
                    <RowDefinition />
                </Grid.RowDefinitions>

                <ContentControl x:Name="outlineView" />
                <ContentControl x:Name="inspectorPlaceholder" Grid.Row="1" />
            </Grid>
            
            

        </Grid>
    </DockPanel>
</Window>
